## Cmake版本
cmake_minimum_required(VERSION 3.10.2)
## 工程名称
project("ffmpegdemo")

## 当前目录下以 cpp hpp c h结尾的原文件打包到 SRC_FILE
file(GLOB SRC_FILE *.cpp *.hpp *.c *.h)

## 打包到ffmpegdemo
add_library(ffmpegdemo SHARED ${SRC_FILE})

## 1. 引用ffmpeg头文件
include_directories(./include)
## 2. 指定ffmpeg动态库打包位置
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/../jniLibs/${CMAKE_ANDROID_ARCH_ABI}")

## 将其它动态库，链接到ffmpegdemo
target_link_libraries(
        ffmpegdemo
        avcodec
        avdevice
        avfilter
        avformat
        avutil
        swresample
        swscale
        z
        android
        log)